<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<script type="text/javascript">
	$(document).ready(function() {
		$("#pager").pager({ 
			pagenumber : $("#curPage").val(),
			pagecount : $("#totalPages").val(), 
			buttonClickCallback : Page.pageClick
			});
	});
	
	var Page = function() {
    	return {
			reload : function() {
				pageClick.call();
			},
    	
			pageClick : function(pageclickednumber) {
				pageclickednumber = (pageclickednumber == undefined) ? $("#curPage").val()
						: pageclickednumber;
				$("#curPage").val(pageclickednumber);
				var form = $("#pagerForm");
				form.submit();
			}
		}
	}();
</script>
<div id="pager"></div>